package com.itheima.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class OrderController {
    @Autowired
    private RestTemplate restTemplate;

    private static final String PARAMENT_URL = "http://cloud-provider-payment";

    @GetMapping("order/zk")
    public String order() {
        return this.restTemplate.getForObject(PARAMENT_URL + "/payment/zk", String.class);
    }
}
